
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
		String path = request.getContextPath();
		String basePath = request.getScheme() + "://" + request.getServerName()
				+ ":" + request.getServerPort() + path + "/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>数据恢复</title>
<LINK href="./css/style.css" type=text/css rel=stylesheet>
<LINK href="./css/main.css" type=text/css rel=stylesheet>
<script src="./js/date.js" type="text/javascript"></script>
<script src="./js/main.js" type="text/javascript"></script>
<script src="./js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="./js/jquery.validate.min.js" type="text/javascript"></script>
<script src="./js/validate.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #5CB7FE;
}
.STYLE1 {font-size: 12px}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
.STYLE5 {font-size: 12px; color: #FF0000; }
.STYLE6 {
	font-size: 16px;
	font-weight: bold;
}
-->
 </style>
</head>
<script type="text/javascript">
	$(document).ready(function() {
		$("#recoverDataBt").click(function() {
		    if (!confirm("你确定要恢复数据吗?")) {
		    	return;
		    }
		    $("#recoverDataDiv").html("数据恢复中...");
			$("#recoverDataBt").hide();
			$.ajax({  
			    url:'recoverEnvData.action?t='+Math.random(),  
			    type:'GET',  
			    data:"{}",  
			    dataType:'json',
			    success:function (data) {
			    	if (data.msg == "success") {
			    		$("#recoverDataDiv").html("数据恢复成功!");
						$("#recoverDataBt").show();	
			    	} else if (data.msg == "recoverying") {
			    		$("#recoverDataDiv").html("数据正在恢复中，请稍等!");
						$("#recoverDataBt").show();	
			    	}else {
			    		$("#recoverDataDiv").html("<span style='background:red'>数据恢复失败,详细信息请查看系统日志!</span>");
						$("#recoverDataBt").show();
			    	}
			    }  
			});
			
		});
		$("#synchCityDataBt").click(function() {
		    if (!confirm("你确定要同步城市数据吗?")) {
		    	return;
		    }
		    $("#synchCityDataDiv").html("数据恢复中...");
			$("#synchCityDataBt").hide();
			$.ajax({  
			    url:'recoverEnvData!synchCityData.action?t='+Math.random(),  
			    type:'GET',  
			    data:"{}",  
			    dataType:'json',
			    success:function (data) {
			    	if (data.msg == "success") {
			    		$("#synchCityDataDiv").html("城市数据同步成功!");
						$("#synchCityDataBt").show();
			    	} else {
			    		$("#synchCityDataDiv").html("<span style='background:red'>城市数据同步失败,详细信息请查看系统日志!</span>");
						$("#synchCityDataBt").show();
			    	}
			    }  
			});
		});
	});
</script>
<body style="overflow-x:hidden">
<table width="100%" height="568" border="0" cellpadding="0"
	cellspacing="0" bordercolor="#D8EDFF">
	<!--DWLayoutTable-->
	<tr>
		<td height="8" colspan="4" valign="top"></td>
		<td width="99%" valign="top"></td>
		<td width="5" valign="top"></td>
	</tr>
	<tr>
		<td height="5" colspan="3" align="right" valign="top"><img
			src="images/icon1.jpg" width="6" height="5" /></td>
		<td colspan="2" valign="top"><img src="images/icon2.jpg" width="100%"
			height="5" /></td>
		<td valign="top"><img src="images/icon3.jpg" width="5" height="5" /></td>
	</tr>
	<tr>
		<td width="7" height="523">&nbsp;</td>
		<td width="5" align="right" valign="top" background="images/icon5.jpg"><img
			src="images/icon5.jpg" width="5" height="5" /></td>
		<td colspan="2" valign="top" bgcolor="#D8EDFF">&nbsp;</td>
		<td valign="top" background="images/main_bg.png">
		
		<table width="98%" border="0" cellpadding="0" cellspacing="0"
			bgcolor="#D8EDFF">
			<!--DWLayoutTable-->
			<tr>
				<td height="30" colspan="3" valign="middle"><span class="STYLE1">&nbsp;[数据恢复]</span></td>
				<td width="29">&nbsp;</td>
			</tr>
			<tr>
				<td height="60" colspan="3" align="left" valign="middle" class="STYLE6">
				<fieldset>
   				 <legend><img alt="功能说明" src="images/manage.png"/> &nbsp;&nbsp;<span class="STYLE1">功能说明</span></legend>
					<table width="800">
						<tr>
							<td class="STYLE1">该功能只能在站点数据丢失时使用，用来恢复一些站点在某些时段丢失的数据。但不建议经常使用，因为这后频繁调用第三方服务器。</td>
						</tr>
				  </table>
		  	     </fieldset>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td width="90" height="60">&nbsp;</td>
				<td width="98%" valign="middle" class="STYLE1">
				<input type="submit" name="recoverDataBt" id="recoverDataBt" value="恢复数据" />
					<span id="recoverDataDiv"></span></td>
				<td width="50">&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td height="60" colspan="3" align="left" valign="middle" class="STYLE6">
				<fieldset>
   				 <legend><img alt="功能说明" src="images/manage.png"/> &nbsp;&nbsp;<span class="STYLE1">功能说明</span></legend>
					<table width="800">
						<tr>
							<td class="STYLE1">该功能只能在新增城市时做同步之用，当用户看到第三方站点已经有新城市加入，但该系统却没有新增这个城市，则可以用该功能来同步城市，这样城市的数据就可以显示在环境数据显示页面。但不建议经常使用，因为这后频繁调用第三方服务器。</td>
						</tr>
				  </table>
		  	     </fieldset>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td width="90" height="60">&nbsp;</td>
				<td width="98%" valign="middle" class="STYLE1">
				<input type="submit" name="synchCityDataBt" id="synchCityDataBt" value="同步城市数据" />
					<span id="synchCityDataDiv"></span></td>
				<td width="50">&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
</table>
		</td>
		<td valign="top" background="images/icon6.jpg"><img
			src="images/icon6.jpg" width="5" height="100" /></td>
	</tr>

	<tr>
		<td height="5"></td>
		<td valign="top"><img src="images/icon7.jpg" width="5" height="5" /></td>
		<td colspan="3" valign="top"><img src="images/icon8.jpg" width="100%"
			height="5" /></td>
		<td valign="top"><img src="images/icon9.jpg" width="5" height="5" /></td>
	</tr>
	<tr>
		<td height="2"></td>
		<td></td>
		<td width="1"></td>
		<td width="6"></td>
		<td></td>
		<td></td>
	</tr>
</table>
</body>
</html>
